]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Enable Alt-f2 in overview
authorColin Walters <walters@verbum.org>
Mon, 14 Sep 2009 19:08:20 +0000 (15:08 -0400)
committerColin Walters <walters@verbum.org>
Tue, 15 Sep 2009 20:20:19 +0000 (16:20 -0400)
This isn't a long-term solution; what we really want is for Alt-F2 to
just be an application search with a hack to detect shell commands,
but in the short term this allows us to run the magic 'lg' command
from the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=595116

js/ui/main.js

index 662e877efe6232f0e4e4cdbd45a7de547a78e145..5251ce8d0b7461d192f40d9cc78c1015486a2912 100644 (file)
@@ -68,10 +68,7 @@ function start() {
 
     global.connect('panel-run-dialog', function(panel) {
         // Make sure not more than one run dialog is shown.
-        if (runDialog == null) {
-            runDialog = new RunDialog.RunDialog();
-        }
-        runDialog.open();
+        getRunDialog().open();
     });
 
     overview = new Overview.Overview();
@@ -178,6 +175,8 @@ function _globalKeyPressHandler(actor, event) {
                 overview.hide();
 
             return true;
+        } else if (symbol == Clutter.F2 && (event.get_state() & Clutter.ModifierType.MOD1_MASK)) {
+            getRunDialog().open();
         }
     }
 
@@ -276,6 +275,13 @@ function createLookingGlass() {
     return lookingGlass;
 }
 
+function getRunDialog() {
+    if (runDialog == null) {
+        runDialog = new RunDialog.RunDialog();
+    }
+    return runDialog;
+}
+
 function createAppLaunchContext() {
     let screen = global.screen;
     let display = screen.get_display();